Skip to content

Conversation

@Kevinjil
Copy link
Contributor

No description provided.

Fix all typing errors and style warnings reported by the `pycodestyle`
tool. The max line length is not PEP 8, but limited to 120 characters.

As working with mixed types such as `list | None` is annoying, the
return value of `None` has been replaced with the empty lists and
dictionaries for most functions, as this results in behavioural
equivalent Python code in our case.
@Kevinjil Kevinjil changed the title Python typing Python code style and typing Nov 22, 2024
@Kevinjil Kevinjil force-pushed the python-typing branch 2 times, most recently from f5ed04a to 224c540 Compare November 22, 2024 13:40
@Kevinjil Kevinjil marked this pull request as ready for review November 22, 2024 14:54
@Kevinjil Kevinjil requested a review from eldering November 22, 2024 15:30
Copy link
Member

@eldering eldering left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than single comment, LGTM

parsed = urlparse(domjudge_webapp_folder_or_api_url)
auth = None
if parsed.username or parsed.password:
if parsed.username and parsed.password:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like an actual bugfix, could you put that in a separate commit?

The HTTP Basic Auth requires both a username and password. The typing in
the requests library does so as well.
@Kevinjil Kevinjil enabled auto-merge November 22, 2024 16:02
@Kevinjil Kevinjil added this pull request to the merge queue Nov 22, 2024
Merged via the queue into DOMjudge:main with commit 29a6717 Nov 22, 2024
32 checks passed
@Kevinjil Kevinjil deleted the python-typing branch November 22, 2024 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants